package com.byb.server.service;

import com.byb.server.service.dto.ExpertOpinionDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Service Interface for managing ExpertOpinion.
 */
public interface ExpertOpinionService {

    /**
     * Save a expertOpinion.
     *
     * @param expertOpinionDTO the entity to save
     * @return the persisted entity
     */
    ExpertOpinionDTO save(ExpertOpinionDTO expertOpinionDTO);

    /**
     *  Get all the expertOpinions.
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<ExpertOpinionDTO> findAll(Pageable pageable);

    /**
     *  Get the "id" expertOpinion.
     *
     *  @param id the id of the entity
     *  @return the entity
     */
    ExpertOpinionDTO findOne(Long id);

    /**
     *  Delete the "id" expertOpinion.
     *
     *  @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the expertOpinion corresponding to the query.
     *
     *  @param query the query of the search
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<ExpertOpinionDTO> search(String query, Pageable pageable);

    /**
     * Get all the expertOpinions by ProductId.
     * @param id
     * @param pageable
     * @return the list of entities
     */
    Page<ExpertOpinionDTO> findAllByProductId(Long id, Pageable pageable);
}
